<template>
  <a-modal
    :destroy-on-close="true"
    :mask-closable="false"
    title="删除"
    :open="visible"
    :onCancel="onCancel"
    :width="300"
  >
    <template #footer>
      <a-button key="back" @click="() => onCancel()">取消</a-button>
      <a-button key="submit" type="primary" @click="onFinish">确定</a-button>
    </template>
    <div>确认删除吗？</div>
  </a-modal>
</template>
<script lang="ts" setup>
import { defineProps } from "vue";
const props = defineProps<{
  visible: boolean;
  onCancel: Function;
  onSubmit: Function;
}>();
const onFinish = () => {
  props.onSubmit();
};
const onCancel = () => {
  props.onCancel();
};
</script>
<style scoped lang="less"></style>
